# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: sh__

pkgname=libtorrent
pkgver=0.13.8
pkgrel=3
pkgdesc='BitTorrent library with a focus on high performance and good code'
url='https://rakshasa.github.io/rtorrent/'
arch=('loong64' 'x86_64')
license=('GPL')
depends=('openssl')
source=("https://github.com/rakshasa/rtorrent/releases/download/v0.9.${pkgver##*.}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('ed115a28f4ae8cfcd33b94a597c076ca74fd549867a26e4fac9505c27288e983')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./autogen.sh
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	export CXXFLAGS+=' -fno-strict-aliasing'
	./configure \
		--prefix=/usr \
		--disable-debug \

	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
}
